package com.gobang.gobangboot.mapper;

import com.gobang.gobangboot.entity.Room.Room;
import com.gobang.gobangboot.entity.Room.RoomCreateDTO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoomMapper {

    @Select("select * from room")
    List<Room> list();

    @Insert("insert into room(room_name, room_owner) values (#{roomName}, #{username})")
    void create(RoomCreateDTO roomCreateDTO);
}
